<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>


<body>
  <div id="test"></div>
</body>



<script type="text/javascript" src="../js/react.development.js"></script>
<script type="text/javascript" src="../js/react-dom.development.js"></script>
<script type="text/javascript" src="../js/babel.min.js"></script>


<script type="text/babel"> //必须声明 babel
  const data = ['react', 'angular', 'vue']
  // 创建虚拟 DOM 元素
  const vDom = (
    <ul>
      {data.map((item, i) => {
        return <li key={i}>{item}</li>
      })}
    </ul>
  )
  // 渲染虚拟 DOM 到页面真实 DOM 容器中
  ReactDOM.render(vDom, document.getElementById('test'))
</script>

</html>